<!--
 * @Author: zi.yang
 * @Date: 2021-09-29 00:13:20
 * @LastEditors: zi.yang
 * @LastEditTime: 2021-10-11 13:53:29
 * @Description: In User Settings Edit
 * @FilePath: \one.pm\src\App.vue
-->
<template>
  <router-view />
</template>
<script>
import { core } from './config/pluginInit'
import { mapActions } from 'vuex'
export default {
  name: 'App',
  mounted () {
    core.mainIndex()
    if (this.$store.state.User.token) {
      this.FetchAllDictData()
    }
  },
  methods: {
    ...mapActions('Dict', ['FetchAllDictData'])
  },
  watch: {
    $route (newVal, oldVal) {
      if (oldVal.path === '/auth/sign-in1') {
        this.FetchAllDictData()
      }
    }
  }
}
</script>
<style lang="scss">
  @import "assets/scss/style.scss";
</style>
